
import argparse
# 设置默认参数
def args_parser():
	parser = argparse.ArgumentParser(description='spikingjelly LIF MNIST Training')
	parser.add_argument('--gpu', default='cpu', help="To use cuda, set to a specific GPU ID. Default set to use CPU.")
	parser.add_argument('--dataset', default='minst',help='minst,fminst,cifar')
	parser.add_argument('--device', default='cuda:0', help='运行的设备，例如“cpu”或“cuda:0”\n Device, e.g., "cuda" or "cuda:0"')
	parser.add_argument('--dataset-dir', default='./', help='保存MNIST数据集的位置，例如“./”\n Root directory for saving MNIST dataset, e.g., "./"')
	parser.add_argument('--log-dir', default='./', help='保存tensorboard日志文件的位置，例如“./”\n Root directory for saving tensorboard logs, e.g., "./"')
	parser.add_argument('--model-output-dir', default='./', help='模型保存路径，例如“./”\n Model directory for saving, e.g., "./"')
	parser.add_argument('-b', '--batch-size', default=1024, type=int, help='Batch 大小，例如“64”\n Batch size, e.g., "64"')
	parser.add_argument('-T', '--timesteps', default=100, type=int, dest='T', help='仿真时长，例如“100”\n Simulating timesteps, e.g., "100"')
	parser.add_argument('--lr', '--learning-rate', default=1e-3, type=float, metavar='LR', help='学习率，例如“1e-3”\n Learning rate, e.g., "1e-3": ', dest='lr')
	parser.add_argument('--tau', default=2.0, type=float, help='LIF神经元的时间常数tau，例如“100.0”\n Membrane time constant, tau, for LIF neurons, e.g., "100.0"')
	parser.add_argument('-N', '--epoch', default=100, type=int, help='训练epoch，例如“100”\n Training epoch, e.g., "100"')
	parser.add_argument('--local_epoch', default=1, type=int, help='终端设备训练的epoch')
	parser.add_argument('--iid', type=int, default=1, help='Default set to IID. Set to 0 for non-IID.是否选用非iid数据')
	parser.add_argument('--num_users', type=int, default=10, help="number of users: K-1")
	parser.add_argument('--frac', type=float, default=1, help='the fraction of clients: C')# 选择比例
	parser.add_argument('--local_bs', type=int, default=1, help="local batch size: B")# 本地的batch size
	parser.add_argument('--unequal', type=int, default=0, help='whether to use unequal data splits for non-i.i.d setting (use 0 for equal splits)')
	parser.add_argument('--optimizer', default='Adam',type=str, help='迭代法')
	args = parser.parse_args()
	return args